package game;

import controller.FindPlayerController;
import controller.OnlineGameGameController;
import util.MyClient;
import view.MainFrame;

/***
 * Author: Mr.Zhao, Time: 2018/5/6/15:00
 * Description: 联机对战
 */
public class OnlineGame {
    public static void main(String[] args) throws Exception {
        MainFrame mainFrame = new MainFrame();
        MyClient myClient = MyClient.getInstance();
        myClient.connect();
        FindPlayerController findPlayerController = new FindPlayerController(mainFrame.getFindPlayerPanel());

        OnlineGameGameController ogc = new OnlineGameGameController(mainFrame);
        myClient.addMessageListener(findPlayerController);
        myClient.addMessageListener(ogc);
    }
}
